3.3.4 \(\int \sqrt {e \sec (c+d x)} (a+i a \tan (c+d x))^3 \, dx\) [204]

3.3.4.1 Optimal result
3.3.4.2 Mathematica [A] (verified)
3.3.4.3 Rubi [A] (verified)
3.3.4.4 Maple [A] (verified)
3.3.4.5 Fricas [C] (verification not implemented)
3.3.4.6 Sympy [F]
3.3.4.7 Maxima [F]
3.3.4.8 Giac [F(-2)]
3.3.4.9 Mupad [F(-1)]

3.3.4.1 Optimal result

Integrand size = 28, antiderivative size = 139 \[ \int \sqrt {e \sec (c+d x)} (a+i a \tan (c+d x))^3 \, dx=\frac {6 i a^3 \sqrt {e \sec (c+d x)}}{d}+\frac {6 a^3 \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {e \sec (c+d x)}}{d}+\frac {2 i a \sqrt {e \sec (c+d x)} (a+i a \tan (c+d x))^2}{5 d}+\frac {6 i \sqrt {e \sec (c+d x)} \left (a^3+i a^3 \tan (c+d x)\right )}{5 d} \]

output
6*I*a^3*(e*sec(d*x+c))^(1/2)/d+6*a^3*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2* 
d*x+1/2*c)*EllipticF(sin(1/2*d*x+1/2*c),2^(1/2))*cos(d*x+c)^(1/2)*(e*sec(d 
*x+c))^(1/2)/d+2/5*I*a*(e*sec(d*x+c))^(1/2)*(a+I*a*tan(d*x+c))^2/d+6/5*I*( 
e*sec(d*x+c))^(1/2)*(a^3+I*a^3*tan(d*x+c))/d
 
3.3.4.2 Mathematica [A] (verified)

Time = 2.37 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.57 \[ \int \sqrt {e \sec (c+d x)} (a+i a \tan (c+d x))^3 \, dx=\frac {a^3 \sec ^2(c+d x) \sqrt {e \sec (c+d x)} \left (18 i+20 i \cos (2 (c+d x))+30 \cos ^{\frac {5}{2}}(c+d x) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )-5 \sin (2 (c+d x))\right )}{5 d} \]

input
Integrate[Sqrt[e*Sec[c + d*x]]*(a + I*a*Tan[c + d*x])^3,x]
 
output
(a^3*Sec[c + d*x]^2*Sqrt[e*Sec[c + d*x]]*(18*I + (20*I)*Cos[2*(c + d*x)] + 
 30*Cos[c + d*x]^(5/2)*EllipticF[(c + d*x)/2, 2] - 5*Sin[2*(c + d*x)]))/(5 
*d)
 
3.3.4.3 Rubi [A] (verified)

Time = 0.66 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.06, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {3042, 3979, 3042, 3979, 3042, 3967, 3042, 4258, 3042, 3120}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (a+i a \tan (c+d x))^3 \sqrt {e \sec (c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (a+i a \tan (c+d x))^3 \sqrt {e \sec (c+d x)}dx\)

\(\Big \downarrow \) 3979

\(\displaystyle \frac {9}{5} a \int \sqrt {e \sec (c+d x)} (i \tan (c+d x) a+a)^2dx+\frac {2 i a (a+i a \tan (c+d x))^2 \sqrt {e \sec (c+d x)}}{5 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {9}{5} a \int \sqrt {e \sec (c+d x)} (i \tan (c+d x) a+a)^2dx+\frac {2 i a (a+i a \tan (c+d x))^2 \sqrt {e \sec (c+d x)}}{5 d}\)

\(\Big \downarrow \) 3979

\(\displaystyle \frac {9}{5} a \left (\frac {5}{3} a \int \sqrt {e \sec (c+d x)} (i \tan (c+d x) a+a)dx+\frac {2 i \left (a^2+i a^2 \tan (c+d x)\right ) \sqrt {e \sec (c+d x)}}{3 d}\right )+\frac {2 i a (a+i a \tan (c+d x))^2 \sqrt {e \sec (c+d x)}}{5 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {9}{5} a \left (\frac {5}{3} a \int \sqrt {e \sec (c+d x)} (i \tan (c+d x) a+a)dx+\frac {2 i \left (a^2+i a^2 \tan (c+d x)\right ) \sqrt {e \sec (c+d x)}}{3 d}\right )+\frac {2 i a (a+i a \tan (c+d x))^2 \sqrt {e \sec (c+d x)}}{5 d}\)

\(\Big \downarrow \) 3967

\(\displaystyle \frac {9}{5} a \left (\frac {5}{3} a \left (a \int \sqrt {e \sec (c+d x)}dx+\frac {2 i a \sqrt {e \sec (c+d x)}}{d}\right )+\frac {2 i \left (a^2+i a^2 \tan (c+d x)\right ) \sqrt {e \sec (c+d x)}}{3 d}\right )+\frac {2 i a (a+i a \tan (c+d x))^2 \sqrt {e \sec (c+d x)}}{5 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {9}{5} a \left (\frac {5}{3} a \left (a \int \sqrt {e \csc \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {2 i a \sqrt {e \sec (c+d x)}}{d}\right )+\frac {2 i \left (a^2+i a^2 \tan (c+d x)\right ) \sqrt {e \sec (c+d x)}}{3 d}\right )+\frac {2 i a (a+i a \tan (c+d x))^2 \sqrt {e \sec (c+d x)}}{5 d}\)

\(\Big \downarrow \) 4258

\(\displaystyle \frac {9}{5} a \left (\frac {5}{3} a \left (a \sqrt {\cos (c+d x)} \sqrt {e \sec (c+d x)} \int \frac {1}{\sqrt {\cos (c+d x)}}dx+\frac {2 i a \sqrt {e \sec (c+d x)}}{d}\right )+\frac {2 i \left (a^2+i a^2 \tan (c+d x)\right ) \sqrt {e \sec (c+d x)}}{3 d}\right )+\frac {2 i a (a+i a \tan (c+d x))^2 \sqrt {e \sec (c+d x)}}{5 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {9}{5} a \left (\frac {5}{3} a \left (a \sqrt {\cos (c+d x)} \sqrt {e \sec (c+d x)} \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+\frac {2 i a \sqrt {e \sec (c+d x)}}{d}\right )+\frac {2 i \left (a^2+i a^2 \tan (c+d x)\right ) \sqrt {e \sec (c+d x)}}{3 d}\right )+\frac {2 i a (a+i a \tan (c+d x))^2 \sqrt {e \sec (c+d x)}}{5 d}\)

\(\Big \downarrow \) 3120

\(\displaystyle \frac {9}{5} a \left (\frac {2 i \left (a^2+i a^2 \tan (c+d x)\right ) \sqrt {e \sec (c+d x)}}{3 d}+\frac {5}{3} a \left (\frac {2 a \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {e \sec (c+d x)}}{d}+\frac {2 i a \sqrt {e \sec (c+d x)}}{d}\right )\right )+\frac {2 i a (a+i a \tan (c+d x))^2 \sqrt {e \sec (c+d x)}}{5 d}\)

input
Int[Sqrt[e*Sec[c + d*x]]*(a + I*a*Tan[c + d*x])^3,x]
 
output
(((2*I)/5)*a*Sqrt[e*Sec[c + d*x]]*(a + I*a*Tan[c + d*x])^2)/d + (9*a*((5*a 
*(((2*I)*a*Sqrt[e*Sec[c + d*x]])/d + (2*a*Sqrt[Cos[c + d*x]]*EllipticF[(c 
+ d*x)/2, 2]*Sqrt[e*Sec[c + d*x]])/d))/3 + (((2*I)/3)*Sqrt[e*Sec[c + d*x]] 
*(a^2 + I*a^2*Tan[c + d*x]))/d))/5
 

3.3.4.3.1 Defintions of rubi rules used

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3120
Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2 
)*(c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
 

rule 3967
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( 
x_)]), x_Symbol] :> Simp[b*((d*Sec[e + f*x])^m/(f*m)), x] + Simp[a   Int[(d 
*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2*m] 
|| NeQ[a^2 + b^2, 0])
 

rule 3979
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( 
x_)])^(n_), x_Symbol] :> Simp[b*(d*Sec[e + f*x])^m*((a + b*Tan[e + f*x])^(n 
 - 1)/(f*(m + n - 1))), x] + Simp[a*((m + 2*n - 2)/(m + n - 1))   Int[(d*Se 
c[e + f*x])^m*(a + b*Tan[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, d, e, f, 
 m}, x] && EqQ[a^2 + b^2, 0] && GtQ[n, 0] && NeQ[m + n - 1, 0] && IntegersQ 
[2*m, 2*n]
 

rule 4258
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x] 
)^n*Sin[c + d*x]^n   Int[1/Sin[c + d*x]^n, x], x] /; FreeQ[{b, c, d}, x] && 
 EqQ[n^2, 1/4]
 
3.3.4.4 Maple [A] (verified)

Time = 14.26 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.13

method result size
default \(\frac {2 a^{3} \sqrt {e \sec \left (d x +c \right )}\, \left (15 i \cos \left (d x +c \right ) F\left (i \left (-\csc \left (d x +c \right )+\cot \left (d x +c \right )\right ), i\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}+15 i F\left (i \left (-\csc \left (d x +c \right )+\cot \left (d x +c \right )\right ), i\right ) \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}+20 i-5 \tan \left (d x +c \right )-i \left (\sec ^{2}\left (d x +c \right )\right )\right )}{5 d}\) \(157\)
parts \(-\frac {2 i a^{3} \left (\cos \left (d x +c \right )+1\right ) \sqrt {e \sec \left (d x +c \right )}\, \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, F\left (i \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ), i\right )}{d}-\frac {i a^{3} \sqrt {e \sec \left (d x +c \right )}\, \left (5 \cos \left (d x +c \right ) \ln \left (\frac {2 \cos \left (d x +c \right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}+2 \sqrt {-\frac {\cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}-\cos \left (d x +c \right )+1}{\cos \left (d x +c \right )+1}\right )-5 \cos \left (d x +c \right ) \ln \left (\frac {4 \cos \left (d x +c \right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}+4 \sqrt {-\frac {\cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}-2 \cos \left (d x +c \right )+2}{\cos \left (d x +c \right )+1}\right )-20 \cos \left (d x +c \right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}-20 \sqrt {-\frac {\cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}+4 \sec \left (d x +c \right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}+4 \left (\sec ^{2}\left (d x +c \right )\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\right )}{10 d \sqrt {-\frac {\cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, \left (\cos \left (d x +c \right )+1\right )}+\frac {6 i a^{3} \sqrt {e \sec \left (d x +c \right )}}{d}-\frac {2 a^{3} \sqrt {e \sec \left (d x +c \right )}\, \left (2 i \cos \left (d x +c \right ) F\left (i \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ), i\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}+2 i F\left (i \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ), i\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}+\tan \left (d x +c \right )\right )}{d}\) \(560\)

input
int((e*sec(d*x+c))^(1/2)*(a+I*a*tan(d*x+c))^3,x,method=_RETURNVERBOSE)
 
output
2/5*a^3/d*(e*sec(d*x+c))^(1/2)*(15*I*cos(d*x+c)*EllipticF(I*(-csc(d*x+c)+c 
ot(d*x+c)),I)*(cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*(1/(cos(d*x+c)+1))^(1/2)+1 
5*I*EllipticF(I*(-csc(d*x+c)+cot(d*x+c)),I)*(cos(d*x+c)/(cos(d*x+c)+1))^(1 
/2)*(1/(cos(d*x+c)+1))^(1/2)+20*I-5*tan(d*x+c)-I*sec(d*x+c)^2)
 
3.3.4.5 Fricas [C] (verification not implemented)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 0.07 (sec) , antiderivative size = 148, normalized size of antiderivative = 1.06 \[ \int \sqrt {e \sec (c+d x)} (a+i a \tan (c+d x))^3 \, dx=-\frac {2 \, {\left (\sqrt {2} {\left (-25 i \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} - 36 i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} - 15 i \, a^{3}\right )} \sqrt {\frac {e}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (\frac {1}{2} i \, d x + \frac {1}{2} i \, c\right )} + 15 \, \sqrt {2} {\left (i \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 2 i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + i \, a^{3}\right )} \sqrt {e} {\rm weierstrassPInverse}\left (-4, 0, e^{\left (i \, d x + i \, c\right )}\right )\right )}}{5 \, {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]

input
integrate((e*sec(d*x+c))^(1/2)*(a+I*a*tan(d*x+c))^3,x, algorithm="fricas")
 
output
-2/5*(sqrt(2)*(-25*I*a^3*e^(4*I*d*x + 4*I*c) - 36*I*a^3*e^(2*I*d*x + 2*I*c 
) - 15*I*a^3)*sqrt(e/(e^(2*I*d*x + 2*I*c) + 1))*e^(1/2*I*d*x + 1/2*I*c) + 
15*sqrt(2)*(I*a^3*e^(4*I*d*x + 4*I*c) + 2*I*a^3*e^(2*I*d*x + 2*I*c) + I*a^ 
3)*sqrt(e)*weierstrassPInverse(-4, 0, e^(I*d*x + I*c)))/(d*e^(4*I*d*x + 4* 
I*c) + 2*d*e^(2*I*d*x + 2*I*c) + d)
 
3.3.4.6 Sympy [F]

\[ \int \sqrt {e \sec (c+d x)} (a+i a \tan (c+d x))^3 \, dx=- i a^{3} \left (\int i \sqrt {e \sec {\left (c + d x \right )}}\, dx + \int \left (- 3 \sqrt {e \sec {\left (c + d x \right )}} \tan {\left (c + d x \right )}\right )\, dx + \int \sqrt {e \sec {\left (c + d x \right )}} \tan ^{3}{\left (c + d x \right )}\, dx + \int \left (- 3 i \sqrt {e \sec {\left (c + d x \right )}} \tan ^{2}{\left (c + d x \right )}\right )\, dx\right ) \]

input
integrate((e*sec(d*x+c))**(1/2)*(a+I*a*tan(d*x+c))**3,x)
 
output
-I*a**3*(Integral(I*sqrt(e*sec(c + d*x)), x) + Integral(-3*sqrt(e*sec(c + 
d*x))*tan(c + d*x), x) + Integral(sqrt(e*sec(c + d*x))*tan(c + d*x)**3, x) 
 + Integral(-3*I*sqrt(e*sec(c + d*x))*tan(c + d*x)**2, x))
 
3.3.4.7 Maxima [F]

\[ \int \sqrt {e \sec (c+d x)} (a+i a \tan (c+d x))^3 \, dx=\int { \sqrt {e \sec \left (d x + c\right )} {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{3} \,d x } \]

input
integrate((e*sec(d*x+c))^(1/2)*(a+I*a*tan(d*x+c))^3,x, algorithm="maxima")
 
output
integrate(sqrt(e*sec(d*x + c))*(I*a*tan(d*x + c) + a)^3, x)
 
3.3.4.8 Giac [F(-2)]

Exception generated. \[ \int \sqrt {e \sec (c+d x)} (a+i a \tan (c+d x))^3 \, dx=\text {Exception raised: TypeError} \]

input
integrate((e*sec(d*x+c))^(1/2)*(a+I*a*tan(d*x+c))^3,x, algorithm="giac")
 
output
Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Unable to divide, perhaps due to ro 
unding error%%%{-1,[2,0]%%%}+%%%{%%{[-2,0]:[1,0,%%%{1,[1]%%%}]%%},[1,0]%%% 
}+%%%{%%%
 
3.3.4.9 Mupad [F(-1)]

Timed out. \[ \int \sqrt {e \sec (c+d x)} (a+i a \tan (c+d x))^3 \, dx=\int \sqrt {\frac {e}{\cos \left (c+d\,x\right )}}\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^3 \,d x \]

input
int((e/cos(c + d*x))^(1/2)*(a + a*tan(c + d*x)*1i)^3,x)
 
output
int((e/cos(c + d*x))^(1/2)*(a + a*tan(c + d*x)*1i)^3, x)